import * as articlesApi from '@/api/hmmm/articles'

const state = {
  articlesList: {}
}

const mutations = {
  SET_ARTIVLES_LIST(state, newValue) {
    state.articlesList = newValue
  }
}

const actions = {
  async updateArticlesList({ commit }, data) {
    const res = await articlesApi.list(data)
    commit('SET_ARTIVLES_LIST', res)
  }
}
export default {
  namespaced: true,
  state,
  actions,
  mutations,
}
